package Code.StringBuilderClass;

import java.util.Scanner;

//链式编程
public class Demo2 {
    public static void main(String[] args) {
        //链式编程
        int len = getString().substring(1).replace("A","a").length();
        System.out.println(len);

        StringBuilder sb = new StringBuilder();
        sb.append(1).append(2).append(3).append(4).append(5).append(6).reverse();
        System.out.println(sb);

    }
    public static String getString(){
        Scanner scanner  =new Scanner(System.in);
        System.out.println("请输入一个字符串：");
        String str = scanner.next();
        return str;
    }
}
